package com.avic.rong.search.activity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.webkit.WebSettings;
import android.webkit.WebView;

import com.avic.rong.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class SearchWebViewActivity extends AppCompatActivity {

    @BindView(R.id.search_webView)
    WebView searchWebView;

    public static String URLSTR = "url";

    @SuppressLint("SetJavaScriptEnabled")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_search_web_view);
        ButterKnife.bind(this);
        String url = getIntent().getStringExtra(URLSTR);
        WebSettings webSettings = searchWebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        if (!TextUtils.isEmpty(url)){
            searchWebView.loadUrl(url);
        }
    }
}
